#ifndef _OI_BELTSPLICE_DIFFAXIS_HPP
#define _OI_BELTSPLICE_DIFFAXIS_HPP

#include "PLScannerCore/OiPLScannerCore.hpp"

namespace Oi { namespace PLScannerCore {

class DiffAxis : public QWidget
{
    Q_OBJECT
public:

    enum Mode
    {
        horiztal = 0,
        vertical
    };

    enum Type
    {
        rangeType,
        descripType
    };

    DiffAxis(QWidget* parent = 0);
    ~DiffAxis();

public:
    void setDescriptions(const QList<QString>& descriptions);
    void addDescription(const QString& description);

public:
    Mode mode() const;
    void setMode(Mode mode);

    Type type() const;
    void setType(Type type);

    double start() const;
    void setStart(double start);

    double end() const;
    void setEnd(double end);

    double step() const;
    void setStep(double step);

    int decimals() const;
    void setDecimals(int decimals);

public:
    QSize sizeHint() const;

public:
    QSize minimumSizeHint() const;

protected:
    void paintEvent(QPaintEvent *event);

private:
    friend class DiffAxisImpl;
    DiffAxisImpl* impl;
};

} }

#endif
